﻿<%@ Page language="c#" Codebehind="Job.aspx.cs" AutoEventWireup="false" Inherits="zsproject.page.Job" %> 
<%@ Import Namespace="eap.share" %>
<%@ Import Namespace="zsproject.page" %>
<%
	//---------------------------------------------------------------//
	string page=Req.getPara(Request,"page");
	string mainPage=Sys.fieldGet(page,1,"_");
	string actionPage=Sys.fieldGet(page,1,"_")+"_action";
	string SCRIPT_NAME=AdminLib.getSimpleRequestURL(Request);
	AdminUser user = (AdminUser)Session["_user"];

	string actlist=(string)output["actlist"];
	int pageRowNum = 20;
	int pageNum = 1;
	if(Req.getPara(Request,"n") != "")
	{
	  pageNum = Convert.ToInt32(Req.getPara(Request,"n").Trim());
	  pageRowNum = Convert.ToInt32(((AdminUser)Session["_user"])["cfg_list"]);      
	}
	//---------------------------------------------------------------//

	string t=Req.getPara(Request,"t");
	string WEB_PAGE =Request.Url.ToString().Replace("&",",");
	string l=Req.getPara(Request,"l");
	string p=Req.getPara(Request,"p");
	string a=Req.getPara(Request,"a"); 
	string tt=Req.getPara(Request,"tt"); 
	string group_id=Req.getPara(Request,"group_id"); 
	//查询属于下属
	if(group_id=="")
	{
		//查询所有管辖区域的企业
		group_id= user["dept_id"];
	}
	
	string method=Req.getPara(Request,"method");
	string method_name=Req.getPara(Request,"method_name");
%>
<html>
<head>
<title><%=AdminLib.STR_TITLE%></title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<meta HTTP-EQUIV='Pragma' CONTENT='no-cache'>
<meta http-equiv='Content-Type' content='text/html; charset=gbk'>
<link rel='stylesheet' href='<%=user.getSkinPath()%>css/eap.css'>
<script language='javascript' src='..<%=AdminLib.EAP_PATH%>/eap.js'></script>
<link rel='stylesheet' href='../skin/zsproject.css'>
<script language='javascript' src='../skin/zsproject.js'></script>
<script charset="UTF-8" src="../tools/kindeditor-4.1.5/kindeditor.js"></script>
<script language='javascript' src="../skin/validation.js"></script>
<script language="javascript" type="text/javascript" src="../tools/My97DatePicker/WdatePicker.js"></script>

<style type="text/css" >
.formitem{background-color: #CBCBCC;}
.formitem th{height:22px; background-color:#E0F1FB;padding-left:3px;text-align:right;}
.formitem td{padding:3px;background-color:#ffffff; line-height:20px;}
</style>

</head>
<!-------------------------------------------框架-------------------------------------->
<%if(t.IndexOf("frame")!=-1){%>
<frameset cols="180,*" frameborder="0" border="0" framespacing="0">
	<frame name="tree" src="../page/tree.aspx?page=<%=t%>&tt=<%=tt%>&l=<%=l%>&p=<%=p%>&a=<%=a%>&f=<%=WEB_PAGE.Replace(t,"")%>" frameborder=yes>
	<frame name="right" src="../page/firm.aspx?page=List&method=<%=method%>" frameborder=yes>
</frameset>
<%return;}%>
<!-------------------------------------------框架-------------------------------------->
<body class="bodyframe" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0">  
<!--#INCLUDE FILE="../epass/verify.aspx"-->
 
<%//信息管理
 if(page=="List"){
   string search_title =(string)output["search_title"];
   System.Data.DataRowCollection list=(System.Data.DataRowCollection)output["list"];
   AdminList lst=(AdminList)output["lst"];
%>

<table class="linetitle" border="0" width="100%" cellspacing="0" cellpadding="1">
<tr>
   <td>
      <table width="100%" border="0" cellspacing="0" cellpadding="0" class="pagetoobar">
         <tr  height="26">
            <td><strong>&nbsp;&nbsp;求职列表</strong></td>
            <td align="right" style="display:none"><input class="ButtonCss" onmouseover="this.className='ButtonCss_mouseover'" onmouseout="this.className='ButtonCss_mouseout'" id="btn_new" type="button" value="新增"  onclick="window.document.location.href='<%=SCRIPT_NAME%>?page=Form&method=edit';"></td>
         </tr>
      </table>
   </td>
</tr>
</table>

<table class=tbsearch border=0 width=100% cellspacing=0 cellpadding=1 style="">
<form name=frmMain method="get" action="<%=lst.getQryURL()%>"><%=lst.getQryURL2()%>
<tr><td>
关键字查询<input type=text size=30 maxlength=151 name="k" value="<%=lst.getKey()%>">
<input type=submit class="ButtonCss" onmouseover="this.className='ButtonCss_mouseover'" onmouseout="this.className='ButtonCss_mouseout'" value="查询" title="<%=search_title%>"> 
</td></tr>
</form>
</table>

<table class="tbsearch" border="0" width="100%" cellspacing="0" cellpadding="1">
	<tr>
		<td>
			<nolayer>
				<iframe name="_action" height="16" width="100%" marginwidth="0" marginheight="0" scrolling="no"
					frameborder="0" src='../admin/office.aspx?page=_action'></iframe>
			</nolayer>
		</td>
	</tr>
</table>
<script type='text/javascript'>popup_path='../admin/popup.aspx';</script>
 
<fieldset class="tfieldset" >

	<legend>
	<table width="100%" cellpadding="0" cellspacing="0">
	   <tr><td class="title"><span>&nbsp;信息列表</span></td> 
	   <td align="right"><span>
		 <input class="ButtonCss" onmouseover="this.className='ButtonCss_mouseover'" onmouseout="this.className='ButtonCss_mouseout'" id="btn_new" type="button" value="新增"  onclick="window.document.location.href='<%=SCRIPT_NAME+"?page=Form&method=edit&group_id="+group_id%>'">
		<input type=button value="删除" title="删除上述选中的记录" class="ButtonCss" onmouseover="this.className='ButtonCss_mouseover'" onmouseout="this.className='ButtonCss_mouseout'" onClick="confirmdel_var(frmg)">
	</span></td></tr>
	</table>
	</legend>

	<div id="tbl-container" style="height:340px">
		<table id="datagrid" border="0" width="100%" cellPadding=0 cellSpacing="0" bgcolor="#99ccff">
			<form  method="POST" action="<%=SCRIPT_NAME+"?page="+actionPage%>" target=_action id="frmg" name="frmg">
			<thead>
				<tr class=linetitle align=center>    
					<th><input type="checkbox" name="chkall" value="on" onClick="checkall(this.form)"  title="全选(删除)"></th>
					<th nowrap><%=lst.getOrder(user,"id","ID","序号")%></th>
					<th nowrap>操作</th>
					<!--------获取标题-------->
					<th nowrap><%=lst.getOrder(user,"name","name","姓名")%></th>
					<th nowrap><%=lst.getOrder(user,"year","year","年龄")%></th>
					<th nowrap><%=lst.getOrder(user,"birthplace","birthplace","籍贯")%></th>
					<th nowrap><%=lst.getOrder(user,"email","email","Email")%></th>
					<th nowrap><%=lst.getOrder(user,"qq","qq","QQ")%></th>
					<th nowrap><%=lst.getOrder(user,"contact","contact","联系人")%></th>
					<th nowrap><%=lst.getOrder(user,"telphone","telphone","联系电话")%></th>
					<th nowrap><%=lst.getOrder(user,"graduate","graduate","毕业学校")%></th>
					<th nowrap><%=lst.getOrder(user,"is_recommend","is_recommend","是否推荐")%></th>
					<th nowrap><%=lst.getOrder(user,"state","state","状态")%></th>
					<th nowrap><%=lst.getOrder(user,"post_time","post_time","发布时间")%></th>
					<th nowrap><%=lst.getOrder(user,"add_time","add_time","添加时间")%></th>
				</tr>
			</thead>
			
			<tbody>	
				<%for(int index=0;list!=null&&index<list.Count;index++){
					System.Data.DataRow map=list[index];
					string id=map["id"].ToString();
				%>
				<tr align=center class=<%if(index % 2 ==1){%>datalineone<%}else{%>datalineone<%}%> onmouseover="dataline_over(this)" onmouseout="dataline_out(this)" onclick="dataline_click(this)">    
					<td nowrap width=60px><input type="checkbox" name="chk_id" id="chk_id" value="<%=map["id"]%>" title="选择(删除)"></td>
					<td nowrap width=60px><%=index+1+(pageNum-1)*pageRowNum%></td>
					<td nowrap width="60px"><input type="button" class="ButtonCss" value="编辑" onclick="window.location.href='<%=SCRIPT_NAME+"?page=Form&method="+method+"&d="+id%>'"></td>
					<!--------获取信息-------->
					<td nowrap align="center"><%=map["name"].ToString()%></td>
					<td nowrap align="center"><%=map["year"].ToString()%></td>
					<td nowrap align="center"><%=map["birthplace"].ToString()%></td>
					<td nowrap align="center"><%=map["email"].ToString()%></td>
					<td nowrap align="center"><%=map["qq"].ToString()%></td>
					<td nowrap align="center"><%=map["contact"].ToString()%></td>
					<td nowrap align="center"><%=map["telphone"].ToString()%></td>
					<td nowrap align="center"><%=map["graduate"].ToString()%></td>
					<td nowrap align="center"><%=map["is_recommend"].ToString()%></td>
					<td nowrap align="center"><%=map["state"].ToString()%></td>
					<td nowrap align="center"><%=map["post_time"].ToString()%></td>
					<td nowrap align="center"><%=map["add_time"].ToString()%></td>
				</tr>
				<%}%>
				<tr class=lineaction style="display:none">
				<td colspan=14 align="left">
				<input type=hidden name=action value="delete">
				<input type=hidden name=d value="">
				<input type=hidden name=reload value="">
				<input type=button value="删除" title="删除上述选中的记录" class="ButtonCss" onmouseover="this.className='ButtonCss_mouseover'" onmouseout="this.className='ButtonCss_mouseout'" onClick="javascript:if(confirm_selected(this.form)){ action.value='delete'; reload.value='reload'; submit(); }">
				</td>
				</tr>
				
			</tbody>
			</form>
		</table>
	</div>
</fieldset>

<table width=100% cellspacing=0 cellpadding=1>
	<tr height=22 align=right>
		<td align="center"> <script>if(document.getElementById("dataGrid").rows.length<=2){document.write("<font color='#ff0000'>查询无结果</font>");}</script></td>
		<td><%=lst.getPageBar()%>页码<%=lst.getPageList()%></td>
	</tr>
</table>
<%}%>

<%
//新增修改页面
if(page=="Form"){
	string edit="";
	System.Data.DataRow map=(System.Data.DataRow)output["map"];
	System.Data.DataRow mapList=(System.Data.DataRow)output["mapList"];
	System.Data.DataRowCollection listAtt=(System.Data.DataRowCollection)output["listAtt"];

	string d=Req.getPara(Request,"d");
	string id=d;
	//定义除了主键以外的字段
	string name="";
	string sex="";
	string year="";
	string birthplace="";
	string education="";
	string email="";
	string qq="";
	string picture="";
	string contact="";
	string telphone="";
	string work_nature="";
	string work_experience="";
	string graduate="";
	string professional="";
	string description="";
	string experience="";
	string education_experience="";
	string is_recommend="";
	string state="";
	string post_time="";
	string accessory_ids="";
	string add_time="";
	string add_user="";
	if(map!=null)
	{
		//获取数据库信息
		id=map["id"].ToString();
		name=map["name"].ToString();
		sex=map["sex"].ToString();
		year=map["year"].ToString();
		birthplace=map["birthplace"].ToString();
		education=map["education"].ToString();
		email=map["email"].ToString();
		qq=map["qq"].ToString();
		picture=map["picture"].ToString();
		contact=map["contact"].ToString();
		telphone=map["telphone"].ToString();
		work_nature=map["work_nature"].ToString();
		work_experience=map["work_experience"].ToString();
		graduate=map["graduate"].ToString();
		professional=map["professional"].ToString();
		description=map["description"].ToString();
		experience=map["experience"].ToString();
		education_experience=map["education_experience"].ToString();
		is_recommend=map["is_recommend"].ToString();
		state=map["state"].ToString();
		post_time=map["post_time"].ToString();
		accessory_ids=map["accessory_ids"].ToString();
		add_time=map["add_time"].ToString();
		add_user=map["add_user"].ToString();

	}else
	{
		//新增,默认值
		state="0";
		is_recommend="0";
	}
%>

<table class="linetitle" border="0" width="100%" cellspacing="0" cellpadding="1">
<tr>
   <td>
      <table width="100%" border="0" cellspacing="0" cellpadding="0" class="pagetoobar">
         <tr height="26">
            <td><strong>&nbsp;&nbsp;求职信息</strong></td>
         </tr>
      </table>
   </td>
</tr>
</table>

<%=AdminLib.getIframe()%>

<table id="" class="formitem" cellspacing="1" cellpadding="0" align="center" border="0" style="background-color:#7F96BE;border-width:0px;width:100%; margin-top:5px">
<form id="frmMain"  name=frmMain method=post target="_action" enctype="multipart/form-data" action="<%=SCRIPT_NAME+"?page="+actionPage+"&d="+id%>">
	<tbody>
		<!--------获取控件--------->
		
		<tr>
			<th align="right" >照片：</td>
			<td bgcolor="#FFFFFF" colspan=6>
				<input type=hidden id="hidPicture" name="hidPicture" value="<%=picture%>">
				<img name="picture" id="picture" width="120px" height="150px" src="<%=picture%>"  alt="预览图片" /><br>
			</td>
		</tr>
		<tr>
			<th align="right" >上传照片：</td>
			<td bgcolor="#FFFFFF" colspan=6>
				
				<input type="file" contenteditable="false" name="file1" id="file1" style="WIDTH: 100%; TEXT-ALIGN: left;TEXT-VALIGN:middle" id="file1" onChange="viewmypic(picture,frmMain.file1);" />
			</td>
		</tr>
		
		<script>
			function viewmypic(mypic,imgfile)
				{				
					if (imgfile.value)
					{       
						mypic.src=imgfile.value;        
						mypic.style.display="";        
						mypic.border=1;   
						
					}        
				}
		</script>
		
		<tr>
			<th align="right">姓名：</th>
			<td>
				<input type="text" id="name" name="name" value="<%=name%>" <%=edit%> style="WIDTH: 300px;TEXT-ALIGN: left;TEXT-VALIGN:middle">
			</td>
		</tr>
		<tr>
			<th align="right">性别：</th>
			<td>
				<select id="sex" name="sex">
				<option value="">--请选择--</option>
				<!--多选按钮select-->
				<%=AdminLib.getDictOption("cyzd.xb",sex,"0")%>
				</select>
			</td>
		</tr>
		<tr>
			<th align="right">年龄：</th>
			<td>
				<input type="text" id="year" name="year" value="<%=year%>" <%=edit%> style="WIDTH: 300px;TEXT-ALIGN: left;TEXT-VALIGN:middle">
			</td>
		</tr>
		<tr>
			<th align="right">籍贯：</th>
			<td>
				<input type="text" id="birthplace" name="birthplace" value="<%=birthplace%>" <%=edit%> style="WIDTH: 300px;TEXT-ALIGN: left;TEXT-VALIGN:middle">
			</td>
		</tr>
		<tr>
			<th align="right">学历：</th>
			<td>
				<select id="education" name="education">
				<option value="">--请选择--</option>
				<!--多选按钮select-->
				<%=AdminLib.getDictOption("cyzd.xl",education,"0")%>
				</select>
			</td>
		</tr>
		<tr>
			<th align="right">Email：</th>
			<td>
				<input type="text" id="email" name="email" value="<%=email%>" <%=edit%> style="WIDTH: 300px;TEXT-ALIGN: left;TEXT-VALIGN:middle">
			</td>
		</tr>
		<tr>
			<th align="right">QQ：</th>
			<td>
				<input type="text" id="qq" name="qq" value="<%=qq%>" <%=edit%> style="WIDTH: 300px;TEXT-ALIGN: left;TEXT-VALIGN:middle">
			</td>
		</tr>
		
		<tr>
			<th align="right">联系人：</th>
			<td>
				<input type="text" id="contact" name="contact" value="<%=contact%>" <%=edit%> style="WIDTH: 300px;TEXT-ALIGN: left;TEXT-VALIGN:middle">
			</td>
		</tr>
		<tr>
			<th align="right">联系电话：</th>
			<td>
				<input type="text" id="telphone" name="telphone" value="<%=telphone%>" <%=edit%> style="WIDTH: 300px;TEXT-ALIGN: left;TEXT-VALIGN:middle">
			</td>
		</tr>
		<tr>
			<th align="right">工作性质：</th>
			<td>
				<select id="work_nature" name="work_nature">
				<option value="">--请选择--</option>
				<!--多选按钮select-->
				<%=AdminLib.getDictOption("qtzd.gzxz",work_nature,"0")%>
				</select>
			</td>
		</tr>
		<tr>
			<th align="right">工作经验(年)：</th>
			<td>
				<select id="work_experience" name="work_experience">
				<option value="">--请选择--</option>
				<!--多选按钮select-->
				<%=AdminLib.getDictOption("qtzd.gzjy",work_experience,"0")%>
				</select>
			</td>
		</tr>
		<tr>
			<th align="right">毕业学校：</th>
			<td>
				<input type="text" id="graduate" name="graduate" value="<%=graduate%>" <%=edit%> style="WIDTH: 300px;TEXT-ALIGN: left;TEXT-VALIGN:middle">
			</td>
		</tr>
		<tr>
			<th align="right">专业：</th>
			<td>
				<input type="text" id="professional" name="professional" value="<%=professional%>" <%=edit%> style="WIDTH: 300px;TEXT-ALIGN: left;TEXT-VALIGN:middle">
			</td>
		</tr>
		<tr>
			<th align="right">自我描述：</th>
			<td>
				<textarea  id="description" name="description" style="width:100%;height:100px;visibility:hidden;"><%=description%></textarea>
				<script>
				
				KindEditor.ready(function(K) {
					K.create('textarea[name="description"]', {
						autoHeightMode : true,
						afterCreate : function() {
							this.loadPlugin('autoheight');
						}
					});
				});
				</script>
			</td>
		</tr>
		<tr>
			<th align="right">工作经历：</th>
			<td>
				<textarea  id="experience" name="experience" style="width:100%;height:100px;visibility:hidden;"><%=experience%></textarea>
				<script>
				
				KindEditor.ready(function(K) {
					K.create('textarea[name="experience"]', {
						autoHeightMode : true,
						afterCreate : function() {
							this.loadPlugin('autoheight');
						}
					});
				});
				</script>
			</td>
		</tr>
		<tr>
			<th align="right">教育经历：</th>
			<td>
				<textarea  id="education_experience" name="education_experience" style="width:100%;height:100px;visibility:hidden;"><%=education_experience%></textarea>
				<script>
				KindEditor.ready(function(K) {
					K.create('textarea[name="education_experience"]', {
						autoHeightMode : true,
						afterCreate : function() {
							this.loadPlugin('autoheight');
						}
					});
				});
				</script>
			</td>
		</tr>
		<tr>
			<th align="right">是否推荐：</th>
			<td>
				<%=AdminLib.getCheckedKeyValue("0,否|1,是","is_recommend",is_recommend,"radio")%>
			</td>
		</tr>
		<tr>
			<th align="right">状态：</th>
			<td>
				<%=AdminLib.getKeyValue("0,未发布|1,已发布",state)%>
			</td>
		</tr>
		<tr>
			<th align="right">发布时间：</th>
			<td>
				<input type="hidden" id="post_time" name="post_time" value="<%=post_time%>"><%=post_time%>
			</td>
		</tr>
		<tr>
			<th align="right">添加时间：</th>
			<td>
				<input type="hidden" id="add_time" name="add_time" value="<%=add_time%>"><%=add_time%>
			</td>
		</tr>
		<tr>
			<th align="right">添加用户：</th>
			<td>
				<input type="hidden" id="add_user" name="add_user" value="<%=add_user%>"><%=add_user%>
			</td>
		</tr>
		<tr>
			<td width="10%"></td>
			<td width="40%"></td>
		</tr>
	

						
		<tr style="display:none">
			<input type="hidden" id="id" name="id" value="<%=id%>">
			<input type="hidden" id="state" name="state" value="<%=state%>">
			<!--隐藏(hidden)-->
			<input type="hidden" id="action" name="action" value="">
			<input type=hidden id="reload" checked name="reload" value='<%=SCRIPT_NAME+"?page=Form&method=edit"%>' >
		</tr>
	      
		<tr>
			<script>
				//操作						
				function toEdit()
				{	
					document.getElementById("action").value="edit";								
					document.getElementById("reload").value='<%=SCRIPT_NAME+"?page=Form&method="+method+"&d={$id}"%>'
				}
			</script>
			<!--按钮-->
			<td colspan="43" align="center">
				<input type="submit" name="edit" class="ButtonCss" value="保存" title="保存操作" onclick="return toEdit();">
				<input type="button" class="ButtonCss" onClick="javscript:window.location.href='<%=SCRIPT_NAME+"?page=List&method="+method%>';" value="返 回" />
			</td>
		</tr>
	</tbody>
</table>
</form>
<%}%>

</body>
</html>